define(["dojo/_base/declare", "dojox/grid/TreeGrid", "dojo/data/ItemFileReadStore", "dojo/data/ItemFileWriteStore"], function(declare){
    declare("my.grid.ScheduleGrid", [dijit.form.Form], {

		dotFormatter : function(value, rowIdx){
			if(rowIdx >= 0){
				return value;
			}
			return "";
		},
		
		startup : function(){
			
			var grid = dijit.byId("scheduleGrid");
			var structure =  [{ cells: [[
			                             { field: "teacher", name: "Teachers", width: "17%"},
			                             { field: "name", name: "Classes", width: "17%"},
			                             { field: "day",  name: "Day", width: "17%"},
			                             { field: "time", name: "Time", width: "17%"},
			                             { field: "room", name: "Classroom", width: "17%"},
			                             { field: "desc", name: "Description", width: "17%"}
			                             ]] }];
			this.inherited(arguments);
    	    grid.set("structure", structure);
    	    grid.startup();
    	    
    	    var reportStore = new dojo.data.ItemFileWriteStore(
		    	    {
		    	    	url:'getScheduleAction.action',
		 			    requestMethod : "post"
		    	    });
    	    var mockStore = new dojo.data.ItemFileWriteStore({url:'scheduleJson.json'});
    	    grid.setStore(reportStore);
		}
    	
    });
});